<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('断路列表')" />
	<link th:href="@{/common/css/public.css}" rel="stylesheet" />
	<link th:href="@{/common/css/style.css}" rel="stylesheet" />
</head>
<body>
<div class="up_list_content">
	<!--list top start-->
	<div class="up_mylist_top">
                <span class="up_list_active_a">
                    本单位危险作业
                </span>
		<div class="up_list_sx"><a href="/dangerous/brokeTasksearchDept">筛选</a></div>
	</div>
	<div class="list_bod">
		<ul class="list_nav list_nav_block">
			<li th:if="${data1==null || data1.size()==0}">
				<!--暂无数据start-->
				<div class="list_no">
					<img src="/common/images/no.png" />
					暂无数据
				</div>
			</li>
			<li th:each="danger:${data1}">
				<div class="list_nav_top">
					<span class="list_nav_zt list_nav_zt_one fleft" th:if="${danger.Status ==0 }">未提交</span>
					<span class="list_nav_zt list_nav_zt_two fleft" th:if="${danger.Status == 1}">生产单位负责人审批中</span>
					<span class="list_nav_zt list_nav_zt_two fleft" th:if="${danger.Status == 2}">设备部负责人审批中</span>
					<span class="list_nav_zt list_nav_zt_five fleft" th:if="${danger.Status == 3}">审批未通过</span>
					<span class="list_nav_zt list_nav_zt_eight fleft" th:if="${danger.Status == 4}">审批通过</span>
					<span class="list_nav_time fright" th:text="'创建时间：'+ ${danger.CreateDate}"></span>
					<div class="clear_both"></div>
				</div>
				<div class="list_nav_desc">
					<!--<input th:value="${danger.Status}" type="hidden" class="status">-->
					<input th:value="${danger.ID}" type="hidden" class="id">
					<font>申请单位：</font>
					<span th:text="${danger.OrganizationName}">姜俊赤</span>
					<div class="clear_both"></div>
					<font>申请人&nbsp;&nbsp;&nbsp;：</font>
					<span th:text="${danger.ApplyUserName}">储运中心</span>
					<div class="clear_both"></div>
					<font>作业内容：</font>
					<span class="list_nav_desc_cont" th:text="${danger.WorkContent}">储运中心储运中心姜俊雄储运中心姜</span>
					<div class="clear_both"></div>
					<font>开始时间：</font>
					<span class="list_nav_desc_cont" th:text="${danger.BeginDate}">姜俊雄储运中心姜</span>
					<div class="clear_both"></div>
					<font>结束时间：</font>
					<span class="list_nav_desc_cont" th:text="${danger.EndDate}">姜俊雄储运中心姜</span>
					<div class="clear_both"></div>
					<font>作业单位：</font>
					<span class="list_nav_desc_cont" th:text="${danger.WorkOrg}">姜俊雄储运中心姜</span>

					<div class="clear_both"></div>
				</div>
			</li>
		</ul>
		<!--列表end-->
	</div>
</div>
<!--foot end-->
</body>
<th:block th:include="include :: footer" />
<script>
    $(function ()
    {
        $(".up_list_top span").click(function ()
        {
            //获取点击的元素给其添加样式，讲其兄弟元素的样式移除
            $(this).addClass("up_list_active").siblings().removeClass("up_list_active");
            //获取选中元素的下标
            var index = $(this).index();
            $(".list_nav").eq(index).addClass("list_nav_block").siblings().removeClass("list_nav_block");
        });
        $(".up_mylist_top span").click(function ()
        {
            //获取点击的元素给其添加样式，讲其兄弟元素的样式移除
            $(this).addClass("up_list_active").siblings().removeClass("up_list_active");
            //获取选中元素的下标
            var index = $(this).index();
            $(".list_nav").eq(index).addClass("list_nav_block").siblings().removeClass("list_nav_block");
        });

        //查看详情
        $(document).on("click",".list_nav_desc",function () {
//            var status = $(this).find(".status").val();
            var id = $(this).find(".id").val();
            location.href = "/dangerous/brokeTaskdetailsDept?entityId="+id;
        });
    });
    //监听返回
    $(function(){
        pushHistory();
        window.addEventListener("popstate", function(e) {
            location.href = "/dangerous/index/?openId="+$.userOperate.openId();
        }, false);
        function pushHistory() {
            var state = {
                title: "title",
                url: "#"
            };
            window.history.pushState(state, "title", "#");
        }
    });
</script>
</html>
